import { PageResultT } from "@/models/ApiResult";
import { XueListVo } from "@/models/xue/XueListVo";
import { XuePageSearchDto } from "@/models/xue/XueListVo";
import { XueSyncDto } from "@/models/xue/XueSyncDto";
import { http } from "@/utils/http";

export async function getXueList(searchDto: XuePageSearchDto) {
    return await http.get<PageResultT<XueListVo>>("api/xue/page", searchDto);
}

export async function syncXue(createDto: XueSyncDto) {
    return await http.post("/api/xue/sync", createDto);
}

export async function getXueDetail(id: string) {
    return await http.get<XueSyncDto>(`api/xue/detail/${id}`);
}

export async function deleteXue(id: string) {
    return await http.delete(`api/xue/${id}`);
}